package com.example.demo;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * 配置视图处理器 
 * 
 * @version 1.5
 * @author fuhw
 */
@Configuration
public class WebSocketViewConfig extends WebMvcConfigurerAdapter {
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("/websocket-msg").setViewName("/websocket-msg");
        registry.addViewController("/ws").setViewName("/ws");
    }
}
